package
{
	import com.mcglib.flac.ComboBoxNumericStepper;
	import com.mcglib.flac.FlacEvent;
	import com.mcglib.flac.NumericStepper;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	
	public class ComboBoxNumericStepperTest extends Sprite
	{
		public function ComboBoxNumericStepperTest()
		{
			super();
			
			var ui:MovieClip = new ComboBoxNumericStepper_UI;
			
			var ns:ComboBoxNumericStepper = ComboBoxNumericStepper.createByAsset(ui);
			
			addChild(ui);
			
			ns.minValue = 1;
			ns.maxValue = 99;
			ns.stepSize = 1;
			
			ns.value = 50;
			
			//这里设置能否编辑数字
			//ns.textEditable = false;
			
			//这里设置是否鼠标按下状态下自动增长
			//ns.autoIncrease = false;
			
			ns.addEventListener(FlacEvent.VALUE_CHANGE,onNsValueChange);
			
		}
		
		private function onNsValueChange(e:FlacEvent):void{
			trace(e.value);
		}
	}
}